package cn.gson.oasys.controller.monitor;

import cn.gson.oasys.model.dao.monitor.MonitorDao;
import cn.gson.oasys.model.entity.monitor.Monitor;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

@RestController
@RequestMapping("/")
public class monitorController {
    @Autowired
    MonitorDao monitorDao;

    /**
     *
     * @return  日志数据
     */
    @RequestMapping("jzhws")
    public String logdata() {
        ArrayList<Monitor> logList = monitorDao.listLog();
        return JSON.toJSONString(logList);
    }
}
